Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Crash when entering background mode (Swift app) #143

Closed
julien-c opened this issue Feb 26, 2015 · 3 comments
Closed

Crash when entering background mode (Swift app) #143

julien-c opened this issue Feb 26, 2015 · 3 comments
Labels

Comments

@julien-c
Copy link

Hi,

My Swift app crashes when tapping the Home button. (Xcode 6.1.1)

Here's the crash report:

screenshot 2015-02-26 a 18 13 28

My app is just doing:

func setupServer() {
        let webRoot = NSBundle.mainBundle().resourcePath?.stringByAppendingPathComponent("www")
        let webServer = GCDWebServer()
        GCDWebServer.setLogLevel(5)
        webServer.addGETHandlerForBasePath("/", directoryPath: webRoot, indexFilename: "index.html", cacheAge: 0, allowRangeRequests: true)
        webServer.startWithPort(self.port, bonjourName: nil)
    }

Any idea what's happening?

@swisspol
Copy link
Owner

You're not keeping the GCDWebServer instance around.

@julien-c
Copy link
Author

You're right. Thanks!

@karnakar
Copy link

karnakar commented Feb 9, 2017

@swisspol

I'm facing the same issue, what do you mean by keeping the instance around

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants