Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Commit

Permalink
Actual add mem-leak fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gabehxd committed Sep 15, 2018
1 parent 0821e38 commit 54fe3dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,7 @@ ASALocalRun/

# Local History for Visual Studio
.localhistory/
#C++
*.elf
*.kip
build/
12 changes: 8 additions & 4 deletions sysmodule/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,21 @@ int main(int argc, char **argv)
fatalSimple(MAKERESULT(Module_Discord, Error_InitSocket));
}

while(true)
{
//waiting for connection
//waiting for connection
if (listen(server_fd, 3) < 0)
{
fatalSimple(MAKERESULT(Module_Discord, Error_Listen));
}
while(true)
{

//Accepting;
if ((new_socket = accept(server_fd, (struct sockaddr *)&address, (socklen_t*)&addrlen))<0)
{
fatalSimple(MAKERESULT(Module_Discord, Error_Accepting));
if (listen(server_fd, 3) < 0)
{
fatalSimple(MAKERESULT(Module_Discord, Error_Listen));
}
}

StartReceiving(new_socket);
Expand Down

0 comments on commit 54fe3dc

Please sign in to comment.