Skip to content

Commit

Permalink
Merge pull request ballerina-platform#14491 from wggihan/Fix-14053
Browse files Browse the repository at this point in the history
Fix socket intermittent issue
  • Loading branch information
VijithaEkanayake authored Mar 18, 2019
2 parents 20624d7 + b4421aa commit 019bb4a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ int joinee = 0;

service echoServer on server {
resource function onConnect(socket:Caller caller) {
joinee = joinee + 1;
io:println("Join: ", joinee);
lock {
joinee = joinee + 1;
io:println("Join: ", joinee);
}
}

resource function onReadReady(socket:Caller caller) {
Expand Down

0 comments on commit 019bb4a

Please sign in to comment.