Skip to content

Commit

Permalink
Working sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
xerbalind committed Dec 7, 2023
1 parent 11e6da0 commit 25ed7da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/assets/scripts/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ socket.on('replymessage', function(obj) {
$("#cammieForm").submit((e) => {
e.preventDefault();
formButton.addClass("is-loading");
socket.timeout(4000).emit("message",{username: formName.val(), message: formMessage.val()},(err,_) => {
socket.timeout(3000).emit("message",{username: formName.val(), message: formMessage.val()},(err,_) => {
if (err) {
responseSuccess.addClass("is-hidden");
responseError.removeClass("is-hidden");
Expand All @@ -25,5 +25,6 @@ $("#cammieForm").submit((e) => {
responseSuccess.text("Message has been successfully sent.");
formMessage.val("");
}
formButton.removeClass("is-loading");
})
});

0 comments on commit 25ed7da

Please sign in to comment.