indigo-astronomy / indigo

INDIGO is a system of standards and frameworks for multiplatform and distributed astronomy software development designed to scale with your needs.
http://www.indigo-astronomy.org
Other
139 stars 64 forks source link

fix crash issue on windows #495

Closed tail-feather closed 10 months ago

tail-feather commented 10 months ago

On windows, close(server->socket) should be closesocket(server->socket).

same as: https://github.com/indigo-astronomy/indigo/blob/a86c08f1d46d46806a2690dc5710cac4563d7afc/indigo_libs/indigo_client.c#L417-L421

rumengb commented 10 months ago

which compiler you use? I am using it for years with gcc and I have not seen any issues whatsoever. if you use msvc we may need to add condition to use closesocket() when msvc is used or test this extensively with gcc.

On Fri, Sep 1, 2023, 7:48 PM tail-feather @.***> wrote:


You can view, comment on, or merge this pull request online at:

https://github.com/indigo-astronomy/indigo/pull/495 Commit Summary

File Changes

(1 file https://github.com/indigo-astronomy/indigo/pull/495/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/indigo-astronomy/indigo/pull/495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5EZBMBBOBZH6JPIEUMYMLXYIGVFANCNFSM6AAAAAA4H2CH2Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rumengb commented 10 months ago

Seems to be fine with gcc too... but please tell me which compiler are you using?

tail-feather commented 10 months ago

Oh... It's odd...

I use MSVC 2019 compiler.
And crash occurs if specify invaild ip address.

tail-feather commented 10 months ago

Maybe it has to be x64. https://stackoverflow.com/a/76847472

Crash occurs on x64 dll.